/**
 * 存储Cookies
 */
import Cookies from 'js-cookie';
export function setStore(name, content) {
  if (!name) return
  if (typeof content !== 'string') {
    content = JSON.stringify(content)
  }
    Cookies.set(name, content,{ expires: 7 })
    // .setItem(name, content)
}

/**
 * 获取Cookies
 */
export function getStore(name) {
  if (!name) return
  if (process.client) {
    return Cookies.get(name)
  }
}

/**
 * 删除Cookies
 */
export function removeStore(name) {
  if (!name) return
  if (process.client) {
    Cookies.remove(name)
  }
}